<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<style>

    #bootstrap-table tr:nth-child(even) {
        background: transparent !important;
    }

    #bootstrap-table th {
        background: transparent !important;
    }

    #bootstrap-table a {
        width: 100%;
        height: 100%;
        display: block;
        color: #000000;
    }

    #bootstrap-table a:hover {
        color: #000000;
    }

    #bootstrap-table a:visited {
        color: #000000;
    }

    #bootstrap-table a:active {
        color: #000000;
    }

    .statusStyle {
        width: 120px;
    }
</style>
<body class="hold-transition skin-yellow sidebar-mini">
<section class="content-header">
    <h1>铆焊分厂工作任务查询</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" class="form-horizontal">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        生产令号
                                    </label>
                                    <label class="control-label">
                                        <input name="prodNo" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入生产令号"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        项目名称
                                    </label>
                                    <label class="control-label">
                                        <input name="proName" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入项目名称"/>
                                    </label>
                                </div>

                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        类型
                                    </label>
                                    <label class="control-label">
                                        <input name="special" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入类型"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        部分
                                    </label>
                                    <label class="control-label">
                                        <input name="part" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入部分"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        图号
                                    </label>
                                    <label class="control-label">
                                        <input name="drawNo" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入图号"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        零件名称
                                    </label>
                                    <label class="control-label">
                                        <input name="drawName" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入零件名称"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        部门
                                    </label>
                                    <label class="control-label">
                                        <input name="dept" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入部门"/>
                                    </label>
                                </div>
                                <!--<div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">-->
                                    <!--<label class="control-label">交货时间</label>-->
                                    <!--<label class="control-label">-->
                                        <!--<input type="text" class="form-control datepicker" name="startTime"-->
                                               <!--readonly="readonly"/>-->
                                        <!--<span> 至 </span>-->
                                        <!--<input type="text" class="form-control datepicker" name="endTime"-->
                                               <!--readonly="readonly"/></label>-->
                                <!--</div>-->
                                <button id="btn-search" type="button" class="btn btn-success">
                                    搜索
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    let table;
    $(function () {
        /**
         * 加载列表
         */
        table = js.table.init({
            url: ctx + "task/solderQuery/list",
            showExport: false,
            columns: [
                {
                    title: '序号', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "生产令号", field: 'prodNo'},
                {title: "项目名称", field: 'proName', width: '220'},
                {title: "类型", field: 'special'},
                {title: "部分", field: 'part'},
                {title: "零件名称", field: 'drawName', width: '200'},
                {title: "图号", field: 'drawNo', width: '200'},
                {title: "零件数量", field: 'drawNum'},
                {title: "工艺路线", field: 'route'},
                // {
                //     title: "状态", field: 'submitStatus', width: '80',
                //     formatter: function (value) {
                //         return '<span class="badge' + classType[value] + '">' + statusName[value] + '</span>';
                //     }
                // },
                {title: "计划完成时间", field: 'prpdPlaEndDat'},
                {title: "部门", field: 'dept', width: '100'}
            ]
        });
        /**
         * 表格搜索
         */
        $("#btn-search").click(function () {
            js.table.search(table);
        });
    });

    /**
     * 重新加载
     */
    function reLoad() {
        js.table.refresh(table);
    }

</script>
</body>
</html>